<?php
class NControllerCommon{
 


function __construct(){
 
$this->db = $db=NFactory::getdbo();


}

function dispatch(){


if(NRequest::getVar('task')){
	$sFunction="task_".NRequest::getVar('task');
	
	if(!method_exists($this,$sFunction)){
		$sFunction="view_default";
	}

}elseif (NRequest::getVar('view')){
	$sFunction="view_".NRequest::getVar('view');
	if(!method_exists($this,$sFunction)){
		$sFunction="view_default";
	} 
} else {
		$sFunction="view_default";

	}
	
	$this->$sFunction();
}

/**
* TODO  getView
*/
function &getView($name){


}


}
?>